Repository navigation
Conversation
| version_id='responseElements.policyVersion.versionId', | ||
| set_as_default='requestParameters.setAsDefault', | ||
| returned_is_default='responseElements.policyVersion.isDefaultVersion', | ||
| event_id=eventID, |
There was a problem hiding this comment.
can we use a | stats count min(_time) as firstTime max(_time) as lastTime............ field in here so that the output is in a table format?
There was a problem hiding this comment.
same with the asl detection.
There was a problem hiding this comment.
Changes applied
About this:
Is there a bug/issue we are trying to fix in here? the current detection does accurate catch the new simulations as well so I was curious what got reported for the current detection.
Yes, the current rule catches the new positive simulation too. The change is mainly about avoiding matches outside the intended scope. This change makes matching more precise: it requires Allow, all actions, and all resources in the same statement, avoiding matches on Deny or restricted permissions. We found this during our review, not from a reported customer issue.
Adding event-key grouping, stats, timestamp creation, and removal of the internal grouping field. matching_row_count counts matching rows after statement expansion, including duplicate ingestion—not distinct API calls. The permission logic remains unchanged.
updated risk drilldown
Updated the search to use event-level stats, replacing dedup and retaining all distinct matching statements and first/last timestamps. Corrected the risk drilldown’s data-model syntax.
| values(set_as_default) AS set_as_default | ||
| values(returned_is_default) AS returned_is_default | ||
| values(matching_statement) AS matching_statement | ||
| BY event_key |
There was a problem hiding this comment.
instead of doing this whole stats BY event_id, its recommended to include the following in the stats that way, for each user, aws_account_id - it is a new row in the result and more like how we have written other AWS detections. No need for creating a new field event_key
signature dest user
user_agent src vendor_account
vendor_region vendor_product
Updated aggregation to use the requested actor/account/source grouping, while retaining event IDs, policy details, and matching statements. Added a distinct event count alongside the matching-row count so duplicate ingestion does not appear as multiple unique events.

Summary
Refines two AWS IAM policy detections to require an Allow statement specifying all actions and all resources within the same statement. Updates descriptions and findings to avoid asserting that policy creation gave the caller permissions.
CreatePolicyVersioneventsEffect="Allow"and exact"*"Action/Resource values within one statement; adds scalar/array handling; retains targetedspath; removes statement-count aggregation; retains actor, policy/version identifiers, default-version flags, event ID, and matching statement.CreatePolicyeventsIn both rules we updated descriptions, logic, findings, false-positive, versions, and modification dates.
Scope clarification
The ASL rule retains its existing
CreatePolicyoperation and unchanged title. Its description now clarifies the actual scope. The title/operation mismatch remains a documented limitation.A matching event does not establish that a policy was attached or that the caller gained its permissions. Non-default versions and conditional wildcard statements remain in scope.
Extraction and performance
Targeted
spathwas selected:spathand JSON functions had effectively equivalent single-event runtimes. These observations do not establish production-scale performance improvements, since the tests were done with uploaded datasets.Validation
Related dataset change
Dataset draft PR: splunk/attack_data#1277
The CloudTrail fixture is replaced with one anonymized real-lab event creating a non-default wildcard Allow policy version. Its filename is preserved. The ASL fixture remains unchanged.
The existing public dataset URL continues to serve the old CloudTrail fixture until the dataset PR is merged.